import request from '@/utils/request'

// 查询菜品列表  bom:food:findAllFood
export function listDish_bom(query) {
  return request({
    url: '/bom/food/findAllFood',
    // /bom/dish/list hualala:food:list
    method: 'get',
    params: query
  })
}
//查询菜品单位计价格  "bom:food:findFoodUnit")
export function listUnitDish_bom(query) {
  return request({
    url: '/bom/food/' + query,
    // /dishbom
    method: 'get',
    // params: query
  })
}
// 获取物料
export function bomDish_bom(query) {
  return request({
    url: '/bom/base/list',
    method: 'get',
    params: query
  })
}
//物料选中
export function selectedStapById(query) {
  return request({
    url: '/bom/base/selectedStapById',
    method: 'get',
    params: query
  })
}
// 物料选中Bom
export function selectedStapByIdForBom(query) {
  return request({
    url: '/bom/base/selectedStapByIdForBom',
    method: 'get',
    params: query
  })
}
// 获取部门
export function listDish_bu() {
  return request({
    url: '',
    method: "get",
  })
}
// 添加成本卡
export function addDish_bom(query) {
  return request({
    url: '/bom/dishbom/add',
    method: "post",
    data: query
  })
}
// bom:dish_bom:add 
// 获取成本卡列表
export function Dish_bomList(query) {
  return request({
    url: '/bom/dishbom/page',
    // 
    method: "get",
    params: query
  })
}
// bom / bom / id 
// 根据ID获取bom数据
export function idDish_bomList(query) {
  return request({
    url: '/bom/dishbom/' + query,
    method: "get",
  })
  // /bom/bom/{id}
}
// bom: dish_bom: edit
// 审核
export function BomDish_bomEdit(query) {
  return request({
    url: '/bom/dishbom/verifier',
    method: "put",
    data: query
  })
}
// 修改BOM信息
export function EditDish_bomEdit(query) {
  return request({
    url: '/bom/dishbom/update',
    method: "put",
    data: query
  })
}

//bom:dish_bom:lock 
// 批量锁定
export function Dish_bomLock(query) {
  return request({
    url: '/bom/dishbom/lock',
    method: "put",
    data: query
  })
}
// bom:shop:find 
export function FindShopBom() {
  return request({
    url: '/bom/shop/find',
    method: "get",
  })
}

export function lockDisBom(query) {
  return request({
    url: '/bom/dishbom/lockBatch',
    method: "put",
    data: query
  })
}
// /bom:dishbom:bompage 获取半成品

export function dishbomBompage(query) {
  return request({
    url: '/bom/dishbom/bompage',
    method: "get",
    params: query
  })
}
// /bom/dishbom/page/log 查看日志
export function dishbomBomlog(query) {
  return request({
    url: '/bom/dishbom/page/log',
    method: "get",
    params: query
  })
}